<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body>
    <script>
      var arr = [];
      for (var i = 0; i < 10; i++) {
        arr[i] = i + 1;
      }
      console.log(arr);	// 输出结果：(10) [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    </script>
  </body>
</html>